home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990422-19990725 / 000153_news@watsun.cc.columbia.edu _Mon Jun 14 12:52:51 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@watsun.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA27933
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Mon, 14 Jun 1999 12:52:51 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id JAA26683
  7.     for kermit.misc@watsun.cc.columbia.edu; Mon, 14 Jun 1999 09:41:47 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. Message-ID: <3765058E.C11E22C6@asares.com>
  10. From: "Brian J. Corcoran" <corcoran@asares.com>
  11. Subject: Re: c-kermit output to stderr on linux
  12. Date: Mon, 14 Jun 1999 13:37:19 +0000
  13. Organization: NETPLEX Internet Services - http://www.ntplx.net/
  14. To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. Frank da Cruz wrote:
  17.  
  18. > In article <3762DA05.B12F366E@asares.com>,
  19. > Brian J. Corcoran <corcoran@asares.com> wrote:
  20. > : I'm trying to get a kermit script to output info to stderr with the
  21. > : following command:
  22. > :
  23. > : writeln error {text line}
  24. > :
  25. > : ...but it's still outputing to stdout. Can anybody help with this?
  26. > :
  27. > You're right, it seems to be doing that.  Yet the code is using
  28. > "fprintf(stderr,...)" in this case.  The reason that the text is not
  29. > actually going to stderr is not obvious.
  30. >
  31. > : If I can't get around the problem this way, is there an easy way to
  32. > : suppress all output from a script, except for certain text?
  33. > :
  34. > WRITE[LN] ERROR should be the way to do it.  However, a workaround (for
  35. > UNIX) would be:
  36. >
  37. >   open write /dev/tty
  38. >
  39. > and then use WRITE (or WRITELN) FILE.
  40.  
  41. ah, but that still sends to stdout, rather than stderr, no? I think I've
  42. found a work-around by using a similar concept, using a dedicated named
  43. pipe.
  44.  
  45. >
  46. >
  47. > : Finally, I've noticed writeln/write-line behaves as write when
  48. > : outputting to stdout (it doesn't include the new-line character). Is
  49. > : this correct behavior?
  50. > :
  51. > No, it's a bug.  This will be corrected in the next Beta edit.  Hopefully
  52. > by then I will also have figured out why writes to sdterr are not going
  53. > to stderr.
  54. >
  55. > I suspect there must be code somewhere that sends stderr to stdout so
  56. > error messages will come out in sequence with other text, rather than
  57. > butting ahead, but the spot is not obvious.  Anyway, if this was done,
  58. > it was probably done for a reason and so fixing it will no doubt break
  59. > something else.  I'll try to sort this out in the next Beta.
  60. >
  61. > Thanks for the report.
  62. >
  63. > - Frank
  64.  
  65. You're welcome. Thanks for the program.
  66.  
  67. -Brian
  68.  
  69.  
  70.